//
// Created by wuxiangan on 2022/5/27.
//

#include "AndroidApplication.h"

namespace LuaGui {
    AndroidApplication::AndroidApplication() {
    }

    AndroidApplication::~AndroidApplication() {
    }

    void AndroidApplication::OnScreenSize() {
        LuaGui::SdlApplication::OnScreenSize();
        SetWindowWidthHeight(m_screen_width, m_screen_height);
    }

    void AndroidApplication::Init(int argc, char **argv) {
        SdlApplication::Init(argc, argv);
        if (!m_font_filepath.empty() && LoadAsset(m_font_filepath.u8string(), m_font_data)) {
            GetPaint()->SetFont((unsigned char*)m_font_data.data(), m_font_data.size());
        }
        StartScript();
    }

}

